package com.xh.xyzp.domain.vo;

import com.xh.xyzp.exception.ApiException;
import lombok.Data;

@Data
public class CompanySubmitReq {
    private Long id;
    private String name;
    private String address;
    private String avatar;

    public void checkParams() {
        if (name == null || name.trim().isEmpty()) {
            throw new ApiException("公司名称不能为空");
        }
        if (address == null || address.trim().isEmpty()) {
            throw new ApiException("公司地址不能为空");
        }
    }

    public CompanySubmitReq(String name, String address, String avatar) {
        this.name = name;
        this.address = address;
        this.avatar = avatar;
    }
}